import ProductListModel from "./model/productListModel.js";
import ProductModel from "./model/productModel.js";
import ProductListController from "./controller/productListController.js";
import ShopCartListController from "./controller/shopCartListController.js";

let controller = ShopCartListController.instance();


// let product = ProductModel.instance({
//     productId: 1,
//     productName: '商品1',
//     price: 1000,
//     description: '强推',
//     stock: 15
// })
// let product2 = ProductModel.instance({
//     productId: 2,
//     productName: '商品1',
//     price: 1000,
//     description: '强推',
//     stock: 15
// })

controller.addProduct({
    productId: 1,
    productName: '商品1',
    price: 1000,
    description: '强推',
    stock: 15
})
controller.addProduct({
    productId: 1,
    productName: '商品1',
    price: 1000,
    description: '强推',
    stock: 15
})
controller.addProduct({
    productId: 1,
    productName: '商品1',
    price: 1000,
    description: '强推',
    stock: 15
})
controller.addProduct({
    productId: 1,
    productName: '商品1',
    price: 1000,
    description: '强推',
    stock: 15
})
controller.addProduct({
    productId: 1,
    productName: '商品1',
    price: 10,
    description: '强推',
    stock: 15
})


console.log(controller.getModel().getShopCartList())
console.log(controller.getModel().getTotalPrice())
controller.createOrder()
